home *** CD-ROM | disk | FTP | other *** search
- Path: ub239.dialup.uwa.edu.au!localhost!prye
- From: prye@cyllene.uwa.edu.au (Peter Rye)
- Newsgroups: comp.lang.c++
- Subject: Re: 2D pointer array to class overwritten
- Date: 08 Apr 1996 05:28:57 GMT
- Organization: The University of Western Australia
- Message-ID: <PRYE.96Apr8132857@cyllene.uwa.edu.au>
- References: <4k89ap$7fl@ctylnk.cityu.edu.hk> <9604071928.AA001og@lorelei.demon.co.uk>
- NNTP-Posting-Host: ub239.dialup.uwa.edu.au
- In-reply-to: John Croudy's message of Sun, 7 Apr 96 19:28:01 GMT
- X-Mailer: GNU Emacs 19.28
-
- >>>>> "John" == John Croudy <john@lorelei.demon.co.uk> writes:
-
- John> On 7 Apr 1996 11:35:53 GMT, 92907308@cpccux0.cityu.edu.hk
- John> wrote:
- >> cout << " "<< ptr[i,j];
-
- John> I'm sure I'm not the only one who spotted the [i,j] instead
- John> of [i][j].
-
- John> But why doesn't the compiler at least warn about this? I
- John> tried and couldn't get a warning out of GNU.
-
- I believe this is perfectly legal syntax.
- It means the same as ptr[j]. (Not that that was what was intended).
- --
- Peter Rye prye@cyllene.uwa.edu.au, prye@ichr.uwa.edu.au
- Respiratory Research Fellow, Princess Margaret Hospital for Children
- Perth, Western Australia Ph: +61 (09) 340 8985, Fax: +61 (09) 388 2097
- ** Smoking areas in restaurants are like peeing areas in swimming pools. **
-